package com.xxl.job.executor.persistence.beans;

import com.google.gson.annotations.SerializedName;

import java.math.BigDecimal;


/**
 * Created by yzm on 2019/11/18.
 */
public class ETCRecordData implements BaseData {

    @SerializedName(value = "ID", alternate = {"id", "Id"})
    private String id;
    @SerializedName(value = "SECTIONID", alternate = {"sectionId"})
    private String sectionId;
    @SerializedName(value = "TOLLGRANTRYID", alternate = {"tollGrantryId"})
    private String tollGrantryId;
    @SerializedName(value = "TRANSTIME", alternate = {"transTime"})
    private String transTime;
    @SerializedName(value = "FEE", alternate = {"fee"})
    private BigDecimal fee;
    @SerializedName(value = "DISCOUNTFEE", alternate = {"discountFee"})
    private BigDecimal discountFee;
    @SerializedName(value = "MEDIATYPE", alternate = {"mediaType"})
    private BigDecimal mediaType;
    @SerializedName(value = "OBUSIGN", alternate = {"obuSign"})
    private BigDecimal obuSign;
    @SerializedName(value = "OBUID", alternate = {"obuId"})
    private String obuId;
    @SerializedName(value = "ETCCARDTYPE", alternate = {"etcCardType"})
    private BigDecimal etcCardType;
    @SerializedName(value = "CARDID", alternate = {"cardId"})
    private String cardId;
    @SerializedName(value = "TERMINALTRANSNO", alternate = {"terminalTransNo"})
    private String terminalTransNo;
    @SerializedName(value = "TOLLINTERVALID", alternate = {"tollIntervalId"})
    private String tollIntervalId;
    @SerializedName(value = "TOLLINTERVALNAME", alternate = {"tollIntervalName"})
    private String tollIntervalName;
    @SerializedName(value = "VEHICLEID", alternate = {"vehicleId"})
    private String vehicleId;
    @SerializedName(value = "IDENTIFYVEHICLEID", alternate = {"identifyVehicleId"})
    private String identifyVehicleId;
    @SerializedName(value = "VEHICLETYPE", alternate = {"vehicleType"})
    private BigDecimal vehicleType;
    @SerializedName(value = "IDENTIFYVEHICLETYPE", alternate = {"identifyVehicleType"})
    private BigDecimal identifyVehicleType;
    @SerializedName(value = "VEHICLECLASS", alternate = {"vehicleClass"})
    private BigDecimal vehicleClass;
    @SerializedName(value = "TRANSFEE", alternate = {"transFee"})
    private BigDecimal transFee;
    @SerializedName(value = "TAC", alternate = {"tac"})
    private String tac;
    @SerializedName(value = "TRANSTYPE", alternate = {"transType"})
    private String transType;
    @SerializedName(value = "TERMINALNO", alternate = {"terminalNo"})
    private String terminalNo;
    @SerializedName(value = "SERVICETYPE", alternate = {"serviceType"})
    private BigDecimal serviceType;
    @SerializedName(value = "ALGORITHMIDENTIFIER", alternate = {"algorithmIdentifier"})
    private BigDecimal algorithmIdentifier;
    @SerializedName(value = "RATEVERSION", alternate = {"rateVersion"})
    private String rateVersion;
    @SerializedName(value = "CONSUMETIME", alternate = {"consumeTime"})
    private BigDecimal consumeTime;
    @SerializedName(value = "INTERRUPTSIGNAL", alternate = {"interruptSignal"})
    private BigDecimal interruptSignal;
    @SerializedName(value = "SPECIALTYPE", alternate = {"specialType"})
    private String specialType;
    @SerializedName(value = "SIGNSTATUS", alternate = {"signStatus"})
    private String signStatus;
    @SerializedName(value = "VEHICLESIGNID", alternate = {"vehicleSignId"})
    private String vehicleSignId;
    @SerializedName(value = "ENTOLLLANEID", alternate = {"enTollLaneId"})
    private String enTollLaneId;
    @SerializedName(value = "ENTOLLLANEHEX", alternate = {"enTollLaneHex"})
    private String enTollLaneHex;
    @SerializedName(value = "ENTIME", alternate = {"enTime"})
    private String enTime;
    @SerializedName(value = "PASSID", alternate = {"passId"})
    private String passId;
    @SerializedName(value = "OBUMAC", alternate = {"obumac"})
    private String obumac;
    @SerializedName(value = "OBUSN", alternate = {"obusn"})
    private String obusn;
    @SerializedName(value = "KEYVERSION", alternate = {"keyVersion"})
    private String keyVersion;
    @SerializedName(value = "DIRECTION", alternate = {"direction"})
    private BigDecimal direction;
    @SerializedName(value = "ELECTRICALPERCENTAGE", alternate = {"electricalPercentage"})
    private BigDecimal electricalPercentage;
    @SerializedName(value = "CARDTYPE", alternate = {"cardType"})
    private BigDecimal cardType;
    private String listNo;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSectionId() {
        return sectionId;
    }

    public void setSectionId(String sectionId) {
        this.sectionId = sectionId;
    }

    public String getTollGrantryId() {
        return tollGrantryId;
    }

    public void setTollGrantryId(String tollGrantryId) {
        this.tollGrantryId = tollGrantryId;
    }

    public String getTransTime() {
        return transTime;
    }

    public void setTransTime(String transTime) {
        this.transTime = transTime;
    }

    public BigDecimal getFee() {
        return fee;
    }

    public void setFee(BigDecimal fee) {
        this.fee = fee;
    }

    public BigDecimal getDiscountFee() {
        return discountFee;
    }

    public void setDiscountFee(BigDecimal discountFee) {
        this.discountFee = discountFee;
    }

    public BigDecimal getMediaType() {
        return mediaType;
    }

    public void setMediaType(BigDecimal mediaType) {
        this.mediaType = mediaType;
    }

    public BigDecimal getObuSign() {
        return obuSign;
    }

    public void setObuSign(BigDecimal obuSign) {
        this.obuSign = obuSign;
    }

    public String getObuId() {
        return obuId;
    }

    public void setObuId(String obuId) {
        this.obuId = obuId;
    }

    public BigDecimal getEtcCardType() {
        return etcCardType;
    }

    public void setEtcCardType(BigDecimal etcCardType) {
        this.etcCardType = etcCardType;
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public String getTerminalTransNo() {
        return terminalTransNo;
    }

    public void setTerminalTransNo(String terminalTransNo) {
        this.terminalTransNo = terminalTransNo;
    }

    public String getTollIntervalId() {
        return tollIntervalId;
    }

    public void setTollIntervalId(String tollIntervalId) {
        this.tollIntervalId = tollIntervalId;
    }

    public String getTollIntervalName() {
        return tollIntervalName;
    }

    public void setTollIntervalName(String tollIntervalName) {
        this.tollIntervalName = tollIntervalName;
    }

    public String getVehicleId() {
        return vehicleId;
    }

    public void setVehicleId(String vehicleId) {
        this.vehicleId = vehicleId;
    }

    public String getIdentifyVehicleId() {
        return identifyVehicleId;
    }

    public void setIdentifyVehicleId(String identifyVehicleId) {
        this.identifyVehicleId = identifyVehicleId;
    }

    public BigDecimal getVehicleType() {
        return vehicleType;
    }

    public void setVehicleType(BigDecimal vehicleType) {
        this.vehicleType = vehicleType;
    }

    public BigDecimal getIdentifyVehicleType() {
        return identifyVehicleType;
    }

    public void setIdentifyVehicleType(BigDecimal identifyVehicleType) {
        this.identifyVehicleType = identifyVehicleType;
    }

    public BigDecimal getVehicleClass() {
        return vehicleClass;
    }

    public void setVehicleClass(BigDecimal vehicleClass) {
        this.vehicleClass = vehicleClass;
    }

    public BigDecimal getTransFee() {
        return transFee;
    }

    public void setTransFee(BigDecimal transFee) {
        this.transFee = transFee;
    }

    public String getTac() {
        return tac;
    }

    public void setTac(String tac) {
        this.tac = tac;
    }

    public String getTransType() {
        return transType;
    }

    public void setTransType(String transType) {
        this.transType = transType;
    }

    public String getTerminalNo() {
        return terminalNo;
    }

    public void setTerminalNo(String terminalNo) {
        this.terminalNo = terminalNo;
    }

    public BigDecimal getServiceType() {
        return serviceType;
    }

    public void setServiceType(BigDecimal serviceType) {
        this.serviceType = serviceType;
    }

    public BigDecimal getAlgorithmIdentifier() {
        return algorithmIdentifier;
    }

    public void setAlgorithmIdentifier(BigDecimal algorithmIdentifier) {
        this.algorithmIdentifier = algorithmIdentifier;
    }

    public String getRateVersion() {
        return rateVersion;
    }

    public void setRateVersion(String rateVersion) {
        this.rateVersion = rateVersion;
    }

    public BigDecimal getConsumeTime() {
        return consumeTime;
    }

    public void setConsumeTime(BigDecimal consumeTime) {
        this.consumeTime = consumeTime;
    }

    public BigDecimal getInterruptSignal() {
        return interruptSignal;
    }

    public void setInterruptSignal(BigDecimal interruptSignal) {
        this.interruptSignal = interruptSignal;
    }

    public String getSpecialType() {
        return specialType;
    }

    public void setSpecialType(String specialType) {
        this.specialType = specialType;
    }

    public String getSignStatus() {
        return signStatus;
    }

    public void setSignStatus(String signStatus) {
        this.signStatus = signStatus;
    }

    public String getVehicleSignId() {
        return vehicleSignId;
    }

    public void setVehicleSignId(String vehicleSignId) {
        this.vehicleSignId = vehicleSignId;
    }

    public String getEnTollLaneId() {
        return enTollLaneId;
    }

    public void setEnTollLaneId(String enTollLaneId) {
        this.enTollLaneId = enTollLaneId;
    }

    public String getEnTollLaneHex() {
        return enTollLaneHex;
    }

    public void setEnTollLaneHex(String enTollLaneHex) {
        this.enTollLaneHex = enTollLaneHex;
    }

    public String getEnTime() {
        return enTime;
    }

    public void setEnTime(String enTime) {
        this.enTime = enTime;
    }

    public String getPassId() {
        return passId;
    }

    public void setPassId(String passId) {
        this.passId = passId;
    }

    public String getObumac() {
        return obumac;
    }

    public void setObumac(String obumac) {
        this.obumac = obumac;
    }

    public String getObusn() {
        return obusn;
    }

    public void setObusn(String obusn) {
        this.obusn = obusn;
    }

    public String getKeyVersion() {
        return keyVersion;
    }

    public void setKeyVersion(String keyVersion) {
        this.keyVersion = keyVersion;
    }

    public BigDecimal getDirection() {
        return direction;
    }

    public void setDirection(BigDecimal direction) {
        this.direction = direction;
    }

    public BigDecimal getElectricalPercentage() {
        return electricalPercentage;
    }

    public void setElectricalPercentage(BigDecimal electricalPercentage) {
        this.electricalPercentage = electricalPercentage;
    }

    public BigDecimal getCardType() {
        return cardType;
    }

    public void setCardType(BigDecimal cardType) {
        this.cardType = cardType;
    }

    public String getListNo() {
        return listNo;
    }

    public void setListNo(String listNo) {
        this.listNo = listNo;
    }

    @Override
    public String findStringByKey(String key) throws Exception {
        String ret = "#{$NOT_FOUND$}#";
        switch (key) {
            case "ID" : ret = getId();break;
            case"SECTIONID" : ret = getSectionId();break;
            case"TOLLGRANTRYID" : ret = getTollGrantryId();break;
            case"TRANSTIME" : ret = getTransTime();break;
            case"OBUID" : ret = getObuId();break;
            case"CARDID" : ret = getCardId();break;
            case"TERMINALTRANSNO" : ret = getTerminalTransNo();break;
            case"TOLLINTERVALID" : ret = getTollIntervalId();break;
            case"TOLLINTERVALNAME" : ret = getTollIntervalName();break;
            case"VEHICLEID" : ret = getVehicleId();break;
            case"IDENTIFYVEHICLEID" : ret = getIdentifyVehicleId();break;
            case"TAC" : ret = getTac();break;
            case"TRANSTYPE" : ret = getTransType();break;
            case"TERMINALNO" : ret = getTerminalNo();break;
            case"RATEVERSION" : ret = getRateVersion();break;
            case"SPECIALTYPE" : ret = getSpecialType();break;
            case"SIGNSTATUS" : ret = getSignStatus();break;
            case"VEHICLESIGNID" : ret = getVehicleSignId();break;
            case"ENTOLLLANEID" : ret = getEnTollLaneId();break;
            case"ENTOLLLANEHEX" : ret = getEnTollLaneHex();break;
            case"ENTIME" : ret = getEnTime();break;
            case"PASSID" : ret = getPassId();break;
            case"OBUMAC" : ret = getObumac();break;
            case"OBUSN" : ret = getObusn();break;
            case"KEYVERSION" : ret = getKeyVersion();break;
            case"LISTNO" : ret = getListNo();break;
            default:break;
        }
        if (ret != null && ret.equals("#{$NOT_FOUND$}#")) {
            throw new Exception("ETCRecordData未匹配到数据:" + key);
        }
        return ret;
    }

    @Override
    public BigDecimal findNumberByKey(String key) throws Exception {
        BigDecimal ret = null;
        boolean bNeeded = false;
        switch (key) {
            case"MEDIATYPE" : ret = getMediaType();bNeeded = true;break;
            case"VEHICLETYPE" : ret = getVehicleType();bNeeded = true;break;
            case"VEHICLECLASS" : ret = getVehicleClass();bNeeded = true;break;
            case"DIRECTION" : ret = getDirection();bNeeded = true;break;

            case"FEE" : ret = getFee();break;
            case"DISCOUNTFEE" : ret = getDiscountFee();break;
            case"TRANSFEE" : ret = getTransFee();break;
            case"CONSUMETIME" : ret = getConsumeTime();break;
            case"OBUSIGN" : ret = getObuSign();break;
            case"ETCCARDTYPE" : ret = getEtcCardType();break;
            case"IDENTIFYVEHICLETYPE" : ret = getIdentifyVehicleType();break;
            case"SERVICETYPE" : ret = getServiceType();break;
            case"ALGORITHMIDENTIFIER" : ret = getAlgorithmIdentifier();break;
            case"INTERRUPTSIGNAL" : ret = getInterruptSignal();break;
            case"ELECTRICALPERCENTAGE" : ret = getElectricalPercentage();break;
            case"CARDTYPE" : ret = getCardType();break;
            default:bNeeded = true;break;
        }
        if (ret == null && bNeeded) {
            throw new Exception("ETCRecordData未匹配到数据" + key);
        }
        return ret;
    }
}
